1. Field of the Invention
The present invention relates to tools for software development. In particular, the present invention relates to a tool for developing real-time software for embedded systems.
2. Discussion of the Related Art
In a typical real-time system, the central processing unit (CPU) performs a number of response time-critical tasks according to a schedule controlled by a kernel of a real-time operating system (RTOS). In accordance with the schedule, each task is allocated a limited amount (“slice”) of time, so that no single task can hoard the CPU—a scarce resource—to the detriment of other tasks. The time allocated to a given task can vary according to the scheduling algorithm that takes into account the priority of each task. Kernels of RTOSes are available commercially from a number of vendors.
FIG. 1 is a block diagram of an embedded system 100. Embedded system 100 includes task management code in the form of an RTOS kernel 101 that controls the scheduling of a number of tasks 102-106 through interfaces 107-111, respectively, called “system calls.” An RTOS often includes a kernel plus hardware driver tasks and other common tasks. An example of a task is a routine for calculating the pixel information for an on-screen display and sending that information to a display driver. System calls 107-111 are each a small program section of the task that communicates with the RTOS kernel 101. System calls 107-111 conform to the requirements of RTOS kernel 101. RTOS kernel 101 allocates time slices and assigns a priority to each task, and activates or deactivates a task through the associated interface according to the time slices and the priority assigned. For example, kernel 101 ensures that an interrupt service task begins execution within a predetermined maximum latency time after an interrupt.
Kernel 101 is also responsible for such “house-keeping” tasks as garbage collection and memory management.
A second embedded system is shown by the embedded system 200 in FIG. 2. In embedded system 200, RTOS kernel 101 in FIG. 1 has been replaced by the RTOS polling loop 201 that performs the task management. A polling loop is also called a cyclic executive. An RTOS polling loop is typically created by a system programmer for a specific application.
To implement embedded system 200, the system programmer provides RTOS polling loop 201 and system calls included in the program code of each of interface 207-211 of tasks 202-206. Typically, task scheduling using a polling loop is simpler than that provided in RTOS kernel 101 and thus requires less memory space for task management code. Furthermore, system calls 207-211 tend to be simpler, and thus the code tends to be smaller, than code for system calls for an RTOS kernel and thus require less memory.